:root {
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

.header {
    background-color: var(--card-background);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.logo-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

nav a:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

nav a.active {
    color: var(--primary-color);
    background-color: var(--background-color);
}

.container {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 5rem;
    height: fit-content;
}

.user-info {
    background-color: var(--card-background);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.user-info h2 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.5rem;
}

.user-info p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.info-item {
    margin: 1rem 0;
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: var(--background-color);
}

.info-item label {
    color: var(--text-light);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: var(--primary-dark);
}

.btn.secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn.secondary:hover {
    background-color: var(--text-color);
}

.content {
    flex-grow: 1;
}

.channel-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background-color: var(--card-background);
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab {
    padding: 0.75rem 1.5rem;
    background-color: var(--background-color);
    border-radius: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.tab:hover {
    background-color: var(--primary-light);
    color: white;
}

.tab.active {
    background-color: var(--primary-color);
    color: white;
}

.channel-list {
    width: 100%;
}

.channel-card {
    background-color: var(--card-background);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    flex: 0 0 calc(33.333% - 1.5rem);
    min-width: 280px;
    max-width: 400px;
}

.channel-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.channel-card:hover::after {
    opacity: 1;
}

.channel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    font-size: 1.25rem;
    color: var(--text-color);
}

.status {
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.025em;
}

.status.FREE {
    background-color: #ecfdf5;
    color: var(--success-color);
}

.status.BUSY {
    background-color: #fef3c7;
    color: var(--warning-color);
}

.status.ERROR {
    background-color: #fee2e2;
    color: white;
    border: 1px solid var(--danger-color);
    background-color: var(--danger-color);
}

.status.UNKNOWN {
    background-color: #e5e7eb;
    color: var(--secondary-color);
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: var(--background-color);
    border-radius: 0.75rem;
    font-size: 0.875rem;
}

.real-status {
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.real-status::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--danger-color);
}

.real-status.idle::before {
    background-color: var(--success-color);
}

.real-status.busy::before {
    background-color: var(--warning-color);
}

.real-status.error::before {
    background-color: var(--danger-color);
}

.idle-status {
    color: var(--text-light);
    font-weight: 500;
}

/* 添加响应式设计 */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .channel-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .channel-card {
        flex: 0 0 calc(50% - 1.5rem);
    }
}

@media (max-width: 640px) {
    .header {
        padding: 1rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .channel-tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
    }
    
    .channel-card {
        flex: 0 0 100%;
    }
}

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.toast {
    background-color: var(--card-background);
    color: var(--text-color);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid var(--warning-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.success {
    border-left-color: var(--success-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.avatar {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: white;
    text-align: center;
    line-height: 32px;
    font-size: 0.875rem;
    font-weight: 500;
}

.channel-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 100%;
}

.claude-channels .channel-card {
    border-left: 3px solid var(--primary-color);
}

.plus-channels .channel-card {
    border-left: 3px solid var(--success-color);
}

.free-channels .channel-card {
    border-left: 3px solid var(--warning-color);
} 